package com.kintreda.ieco_server.module.api.web;

import com.kintreda.ieco_server.module.system.service.ICityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * @Created by IntelliJ IDEA
 * @Project_Name ieco_server
 * @Package com.kintreda.ieco_server.module.api.web
 * @Author ZhongYao_H
 * @Date 2019/5/21:18:31
 * @Year 2019 Month 05 Day 21
 * @Date_zh 2019 年 五月 星期二
 */

@Controller
@RequestMapping("/api/city")
public class ApiCityController {


    @Autowired
    ICityService cityService;

    @RequestMapping(value = "/query",method = RequestMethod.POST)
    @ResponseBody
    public Object queryCity(){
        return cityService.query("from City order by createDate ",null);
    }
}
